<extend name="Base/common"/>
<block name="body">
    <style type="text/css">
        h1 {
            font-size: 24px;
            color: #009688;
            text-align: center;
            margin-bottom: 30px;
        }

        .layui-input-inline div {
            color: grey;
        }

        .layui-container {
            margin-bottom: 110px;
        }

        .add a {
            width: 100px;
            float: left;
        }

        #main {
            width: 330px;
            height: 38px;
            border: 1px #009688 solid;
            /*margin-left: 400px;*/
            text-align: right;
            border-right: none;
            float: right;
        }

        input {
            font-size: 20px;
            height: 20px;
            text-align: left;
            padding: 8px;
            border: none;
        }

        #search {
            float: right;
        }

        th a {
            margin: 0 10px;
        }
    </style>

    <fieldset  class="layui-elem-field site-demo-button" style="margin:20px 5px 20px 5px;padding:30px 5px; ">
        <legend><h1>路线信息</h1></legend>
        <div>

            <!--头部-->
            <div class="layui-container">
                <!--新增-->
                <div class="add"><a href="{:U('addAddr')}" class="layui-btn">新增</a></div>
                <!--搜索框-->
                <div id="main">
                    <input type="text" name="title" placeholder="search">
                    <button class="layui-btn" id="search">搜索</button>
                </div>
                <div style="height: 0;clear: none"></div>
            </div>
            <!--表格开始-->
            <div class="layui-form">
                <table class="layui-table">
                    <!--表格列宽-->
                    <!--表头-->
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>发车时间</th>
                        <th>出发地</th>
                        <th>目的地</th>
                        <th>车载人数</th>
                        <th>票价</th>
                        <th>是否必发车</th>
                        <th>车次状态</th>
                        <th>是否启用</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <!--表内容-->
                    <tbody>
                    <foreach name="listInfo" item="v">

                        <tr>
                            <th>{$v.addr_id}</th>
                            <th>{$v.addr_depart_time | date='y-m-d',###}</th>
                            <th>{$v.addr_from}</th>
                            <th>{$v.addr_to}</th>
                            <th>{$v.addr_depart_person_num}</th>
                            <th>{$v.addr_price}</th>
                            <th>
                                <if condition="$v.addr_depart_condition">
                                    必发车
                                    <else/>
                                    预发车
                                </if>
                            </th>
                            <th>
                                <if condition="$v.addr_is_depart eq 0">
                                    已取消
                                    <elseif condition="$v.addr_is_depart eq 1"/>
                                    未发车
                                    <elseif condition="$v.addr_is_depart eq 2"/>
                                    已发车
                                    <else/>
                                    待确认
                                </if>
                            </th>
                            <th>
                                <if condition="$v.addr_status">
                                    启用
                                    <else/>
                                    废弃
                                </if>
                            </th>

                            <th>
                                <a href="./addrAmend.html" class="layui-btn layui-btn-mini">修改</a>
                                <a href="./orderDetails.html" class="layui-btn layui-btn-normal layui-btn-mini">详情</a>
                                <a href="" class="layui-btn layui-btn-danger layui-btn-mini">删除</a>
                            </th>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
            </div>


        </div>
    </fieldset>


    <!--表格结束-->
    <script src="../plugins/layui/layui.js" charset="utf-8"></script>
    <script>
        layui.use('table', function () {
            var table = layui.table;
        });
    </script>


</block>